package com.magic.process;

import com.magic.enums.MeetingEventEnum;
import com.magic.enums.OperatorOrderEnum;
import com.magic.handler.MeetingHelper;

/**
 * @author magic
 * @version 1.0
 * @date 2022/2/22 15:08
 */
public interface IMeetingOperator {
  Boolean support(MeetingEventEnum meetingEventEnum);

  default Boolean moduleSwitch(Integer tenantId){
    return tenantId != null && tenantId > 0;
  }

  /**
   * 每一个operator都有一个order，多个operator按照order顺序执行
   * @return -
   */
  default OperatorOrderEnum currentOrder() {
    return OperatorOrderEnum.NORMAL;
  }

  MeetingHelper[] beforeEvent(MeetingEventEnum meetingEventEnum, MeetingHelper... helpers);

  MeetingHelper[] afterEvent(MeetingEventEnum meetingEventEnum, MeetingHelper... helpers);

}
